﻿using System.IO;

namespace SimpleServiceBus.Utilities
{
    public static class StreamHelper
    {
        public static void CopyStream(Stream input, Stream output)
        {
            var buffer = new byte[32768];
            while (true)
            {
                int read = input.Read(buffer, 0, buffer.Length);
                if (read <= 0)
                    return;
                output.Write(buffer, 0, read);
            }

        }
    }
}
    
